import { Label, find } from "cc";
import { Logger } from "../../../sdk/API";
import { GameLogic } from "../../../sdk/ecs/GameLogic";

export class TestLogic2 extends GameLogic{
    get NAME(): string {return "TestLogic2"}
    
    private lab:Label;
    execute(...params: any) {
        Logger.log("==========TestLogic2============")
        this.lab = find("Label",params[0]).getComponent(Label) 
        setTimeout(()=>{
            this.lab.string += " new sword"
        },5000)
        
    }
    init() {
        this.addMsg("tt",this.onTT,this)
    }
    private onTT(cc:any,n:string){ 
        console.log("----TestLogic2-->----") 
    }
    
}